package com.hmis.domain;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 诊室信息表
 *
 * @TableName clinic
 */
@TableName(value = "clinic")
@Data
public class Clinic implements Serializable {
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
    /**
     * 门诊编号
     */
    @TableId(value = "clinic_id", type = IdType.AUTO)
    private Long clinicId;
    /**
     * 门诊地址
     */
    @TableField(value = "address")
    private String address;
    /**
     * 所属科室id
     */
    @TableField(value = "dept_id")
    private Long deptId;
    /**
     * 所属科室名
     */
    @TableField(value = "dept_name")
    private String deptName;
    /**
     * 值班医生id
     */
    @TableField(value = "duty_doctor_id")
    private Long dutyDoctorId;
    /**
     * 值班医生名
     */
    @TableField(value = "duty_doctor")
    private String dutyDoctor;
    /**
     * 值班时间
     */
    @TableField(value = "duty_time")
    private Date dutyTime;
    /**
     * 下班时间
     */
    @TableField(value = "duty_end_time")
    private Date dutyEndTime;
    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;
    /**
     * 修改时间
     */
    @TableField(value = "modify_time", fill = FieldFill.INSERT_UPDATE)
    private Date modifyTime;
    /**
     * 是否删除
     */
    @TableField(value = "is_delete")
    private Integer isDelete;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Clinic other = (Clinic) that;
        return (this.getClinicId() == null ? other.getClinicId() == null : this.getClinicId().equals(other.getClinicId()))
                && (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()))
                && (this.getDeptId() == null ? other.getDeptId() == null : this.getDeptId().equals(other.getDeptId()))
                && (this.getDeptName() == null ? other.getDeptName() == null : this.getDeptName().equals(other.getDeptName()))
                && (this.getDutyDoctorId() == null ? other.getDutyDoctorId() == null : this.getDutyDoctorId().equals(other.getDutyDoctorId()))
                && (this.getDutyDoctor() == null ? other.getDutyDoctor() == null : this.getDutyDoctor().equals(other.getDutyDoctor()))
                && (this.getDutyTime() == null ? other.getDutyTime() == null : this.getDutyTime().equals(other.getDutyTime()))
                && (this.getDutyEndTime() == null ? other.getDutyEndTime() == null : this.getDutyEndTime().equals(other.getDutyEndTime()))
                && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
                && (this.getModifyTime() == null ? other.getModifyTime() == null : this.getModifyTime().equals(other.getModifyTime()))
                && (this.getIsDelete() == null ? other.getIsDelete() == null : this.getIsDelete().equals(other.getIsDelete()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getClinicId() == null) ? 0 : getClinicId().hashCode());
        result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
        result = prime * result + ((getDeptId() == null) ? 0 : getDeptId().hashCode());
        result = prime * result + ((getDeptName() == null) ? 0 : getDeptName().hashCode());
        result = prime * result + ((getDutyDoctorId() == null) ? 0 : getDutyDoctorId().hashCode());
        result = prime * result + ((getDutyDoctor() == null) ? 0 : getDutyDoctor().hashCode());
        result = prime * result + ((getDutyTime() == null) ? 0 : getDutyTime().hashCode());
        result = prime * result + ((getDutyEndTime() == null) ? 0 : getDutyEndTime().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getModifyTime() == null) ? 0 : getModifyTime().hashCode());
        result = prime * result + ((getIsDelete() == null) ? 0 : getIsDelete().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", clinicId=").append(clinicId);
        sb.append(", address=").append(address);
        sb.append(", deptId=").append(deptId);
        sb.append(", deptName=").append(deptName);
        sb.append(", dutyDoctorId=").append(dutyDoctorId);
        sb.append(", dutyDoctor=").append(dutyDoctor);
        sb.append(", dutyTime=").append(dutyTime);
        sb.append(", dutyEndTime=").append(dutyEndTime);
        sb.append(", createTime=").append(createTime);
        sb.append(", modifyTime=").append(modifyTime);
        sb.append(", isDelete=").append(isDelete);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}